import java.util.ArrayList;

import junit.framework.TestCase;

/**
 * 
 */

/**
 * @author Simon
 *
 */
public class FacultyTest extends TestCase
{
	Person p1 = new Person("Simon Wielens");
	Person p2 = new Person("Colin McGrath");
	Faculty f = new Faculty();
	public void testAddPerson()
	{
		ArrayList<Person> list= new ArrayList<Person>();
		list.add(p1);
		f.addStaffMember(p1);
		assertEquals(list, f.getStaff());
	}
	public void testRemovePerson()
	{
		ArrayList<Person> list= new ArrayList<Person>();
		list.add(p1);
		list.add(p2);
		f.addStaffMember(p1);
		f.addStaffMember(p2);
		f.remove();
		list.remove(p2);
		assertEquals(f.getStaff(), list);
	}
	
	public void testEquals()
	{
		Faculty f1 = new Faculty();
		Faculty f2 = new Faculty();
		
		f1.setName("dcu");
		f1.setAddress("Ireland");
		f1.addStaffMember(p1);
		f1.addStaffMember(p2);
		f1.setTotalFacultyCitations(100);
		f1.setTotalFacultyPapers(30);
		
		f2.setName("dcu");
		f2.setAddress("Ireland");
		f2.addStaffMember(p1);
		f2.addStaffMember(p2);
		f2.setTotalFacultyCitations(100);
		f2.setTotalFacultyPapers(30);
		
		assertEquals(f1.equals(f2), true);
	}
}
